<?php
$page = array('datePicker' => true, 'tableSort' => true, 'prototype' => true);
$this->load->view('layout/adminHeader', $page); ?>
    
    <div id="mainContent" class="floatFix">
    	<?php $this->load->view('layout/adminBookingsSubmenu'); ?>
        
    	<div class="lCol">
        	<?php $this->load->view('layout/flashdata'); ?>
            
           	<h2>Step 6 : Informations</h2>
			
			<h3>Booking informations</h3>
			<ul class="displayList">
					<li class="floatFix">
						<p class="dlLabel">Booking number:</p>
						<p class="dlContent"><?php if (isset($booking['booking_number'])) echo $booking['booking_number']; ?>	</p>
					</li>
					<li class="floatFix">
						<p class="dlLabel">Booking Date:</p>
						<p class="dlContent"><?php if (isset($booking['booking_date'])) echo natural_date_for_site($booking['booking_date'],TRUE); ?>	</p>
					</li>		
			</ul>
			
			<h3>Tour informations</h3>
			<ul class="displayList">
					<li class="floatFix">
						<p class="dlLabel">Name:</p>
						<p class="dlContent"><?php if (isset($tour['tour_name'])) echo $tour['tour_name']; ?>	</p>
					</li>
					<li class="floatFix">
						<p class="dlLabel">Departure Date:</p>
						<p class="dlContent"><?php if (isset($tour['departure'])) echo natural_date_for_site($tour['departure'],TRUE); ?>	</p>
					</li>		
			</ul>
			
			<h3>User inforations</h3>
			<ul class="displayList">
				<li class="floatFix">
					<p class="dlLabel">First Name:</p>
					<p class="dlContent"><?php if (isset($user['first_name'])) echo $user['first_name'];?>	</p>
				</li>
				<li class="floatFix">
					<p class="dlLabel">Last Name:</p>
					<p class="dlContent"><?php if (isset($user['last_name'])) echo $user['last_name'];?> </p>
				</li>
				<li class="floatFix">
					<p class="dlLabel">Sex:</p>
					<p class="dlContent"><?php if (isset($user['sex'])) echo $user['sex'];?> </p>
				</li>
				<li class="floatFix">
					<p class="dlLabel">Nationality:</p>
					<p class="dlContent"><?php if (isset($user['nationality'])) echo $user['nationality'];?>	</p>
				</li>
				<li class="floatFix">
					<p class="dlLabel">E-mail address:</p>
					<p class="dlContent"><?php if (isset($user['e_mail'])) echo $user['e_mail'];?> </p>
				</li>
				<li class="floatFix">
					<p class="dlLabel">Phone Number:</p>
					<p class="dlContent"><?php if (isset($user['phone_number'])) echo $user['phone_number'];?> </p>
				</li>
				<?php if( (isset($user['address'])) && (!empty($user['address'])) ) {?>
				<li class="floatFix">
					<p class="dlLabel">Address:</p>
					<p class="dlContent"><?php echo $user['address'];?> </p>
				</li>
				<?php }?>
				<?php if( (isset($user['city'])) && (!empty($user['city'])) ) {?>
				<li class="floatFix">
					<p class="dlLabel">City:</p>
					<p class="dlContent"><?php echo $user['city'];?>	</p>
				</li>
				<?php }?>
				<?php if( (isset($user['post_code'])) && (!empty($user['post_code'])) ) {?>
				<li class="floatFix">
					<p class="dlLabel">Post Code:</p>
					<p class="dlContent"><?php echo $user['post_code']?> </p>
				</li>		
				<?php }?>		
				<li class="floatFix">
					<p class="dlLabel">Country:</p>
					<p class="dlContent"><?php if (isset($user['country'])) echo $user['country'];?> </p>
				</li>	
			</ul>	
			
			<h3>Passengers informations</h3>
			<?php foreach($passengers as $passenger){?>
			<ul class="displayList">
				<li class="floatFix">
					<p class="dlLabel">First Name:</p>
					<p class="dlContent"><?php echo $passenger['first_name']; ?>	</p>
				</li>
				<li class="floatFix">
					<p class="dlLabel">Last Name:</p>
					<p class="dlContent"><?php echo $passenger['last_name']; ?>	</p>
				</li>						
				<li class="floatFix">
					<p class="dlLabel">Sex:</p>
					<p class="dlContent"><?php echo $passenger['sex']; ?>	</p>
				</li>		
				<li class="floatFix">
					<p class="dlLabel">Nationality:</p>
					<p class="dlContent"><?php echo $passenger['nationality']; ?>	</p>
				</li>		
				<?php if(!empty($passenger['emergency_phone_number'])) {?>						
				<li class="floatFix">
					<p class="dlLabel">Emergency Phone Number:</p>
					<p class="dlContent"><?php echo $passenger['emergency_phone_number']; ?>	</p>
				</li>	
				<?php }?>
			</ul><br />
			<?php }?>
			
			<h3>Price informations</h3>
			TODO
			
			<h3>Payment informations</h3>
			<?php foreach($payments as $payment){?>
			<ul class="displayList">
					<li class="floatFix">
						<p class="dlLabel">Total Amount:</p>
						<p class="dlContent"><?php if (isset($payment['amount'])) echo $payment['amount']; ?>	</p>
					</li>
					<li class="floatFix">
						<p class="dlLabel">Payment Date:</p>
						<p class="dlContent"><?php if (isset($payment['payment_date'])) echo natural_date_for_site($payment['payment_date'],TRUE); ?>	</p>
					</li>	
					<li class="floatFix">
						<p class="dlLabel">Method:</p>
						<p class="dlContent"><?php if (isset($payment['method'])) echo $payment['method']; ?>	</p>
					</li>	
					<li class="floatFix">
						<p class="dlLabel">Location:</p>
						<p class="dlContent"><?php if (isset($payment['location'])) echo $payment['location']; ?>	</p>
					</li>	
			</ul><br />
			<?php }?>
			
			<a href="#">Terminate : go back to the home page</a>
        </div>
        
        <div class="rCol">
        	<h2>Sidebar</h2>
        </div>
        
    </div>
    
<?php $this->load->view('layout/adminFooter'); ?>